home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Misc / CyberMan / chess.cyber next >
Text File  |  1992-12-26  |  828b  |  23 lines

  1. chess="Chess";
  2. if (!running(chess)) {
  3.     launch(chess);
  4.     printf("chess launched\n");
  5.     sleep(2);
  6. }
  7. refreshWindowList();
  8. while (!active(chess)) {
  9.     unhide(chess);
  10.     printf("Unhid chess\n");
  11.     sleep(2);
  12. }
  13. refreshWindowList();
  14. postMouseEvent(chess, NX_LMOUSEDOWN, 1, -1, 392, 117, BOTTOM_LEFT);
  15. postMouseEvent(chess, NX_LMOUSEUP, 1, -1, 392, 117, BOTTOM_LEFT);
  16. postMouseEvent(chess, NX_LMOUSEDOWN, 1, -1, 392, 117, BOTTOM_LEFT);
  17. postMouseEvent(chess, NX_LMOUSEDRAGGED, 0, -1, 390, 117, BOTTOM_LEFT);
  18. postMouseEvent(chess, NX_LMOUSEDRAGGED, 0, -1, 390, 130, BOTTOM_LEFT);
  19. postMouseEvent(chess, NX_LMOUSEDRAGGED, 0, -1, 390, 190, BOTTOM_LEFT);
  20. postMouseEvent(chess, NX_LMOUSEDRAGGED, 0, -1, 390, 230, BOTTOM_LEFT);
  21. postMouseEvent(chess, NX_LMOUSEUP, 1, -1, 392, 267, BOTTOM_LEFT);
  22. postKeyEvent("Stuart", 0, "echo Yowza!\n");
  23. flushEvents();